home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1993 September / September 93.iso / Archives / Fun, Tricks & Hacks / Windows / MSWindows.r < prev    next >
Encoding:
Text File  |  1992-06-14  |  8.6 KB  |  424 lines  |  [TEXT/MPS ]

  1.  
  2. #include "Types.r"
  3. #include "SysTypes.r"
  4.  
  5. #include "Resource.h"
  6.  
  7. resource 'vers' (1, "Windows") {
  8.     0x03, 0x00, release, 0x0,
  9.     verUs,
  10.     "3.0",
  11.     "3.0 by Bob Spence"
  12. };
  13.  
  14. resource 'vers' (2, "Windows") {
  15.     0x03, 0x00, release, 0x0,
  16.     verUs,
  17.     "3.0",
  18.     "  for the Macintosh"
  19. };
  20.  
  21. resource 'BNDL' (128) {
  22.     'MsWn',
  23.     0,
  24.     {
  25.         'FREF', { 0, 128 },
  26.         'ICN#', { 0, 128 }
  27.     }
  28. };
  29.  
  30. resource 'FREF' (128) {
  31.     'APPL',
  32.     0,
  33.     ""
  34. };
  35.  
  36. data 'MsWn' (0, "Owner resource") {
  37.     "3.0 by Bob Spence"
  38. };
  39.  
  40.  
  41. resource 'MENU' (mApple, "Apple", preload) {
  42.     mApple, textMenuProc,
  43.     AllItems & ~MenuItem2,    /* Disable dashed line, enable About and DAs */
  44.     enabled, apple,
  45.     {
  46.         "About Windows…",
  47.             noicon, nokey, nomark, plain;
  48.         "-",
  49.             noicon, nokey, nomark, plain
  50.     }
  51. };
  52.  
  53. resource 'MENU' (mFile, "File", preload) {
  54.     mFile, textMenuProc,
  55.     AllItems,                /* everything */
  56.     enabled, "File",
  57.     {
  58.         "Program Manager…",
  59.             noicon, nokey, nomark, plain;
  60.         "-",
  61.             noicon, nokey, nomark, plain;
  62.         "Soft SoundBlaster",
  63.             noicon, nokey, check, plain;
  64.         "-",
  65.             noicon, nokey, nomark, plain;
  66.         "Quit",
  67.             noicon, "Q", nomark, plain;
  68.     }
  69. };
  70.  
  71. resource 'MENU' (mEdit, "Edit", preload) {
  72.     mEdit, textMenuProc,
  73.     NoItems,                /* disable everything, program does the enabling */
  74.     enabled, "Edit",
  75.      {
  76.         "Undo",
  77.             noicon, "Z", nomark, plain;
  78.         "-",
  79.             noicon, nokey, nomark, plain;
  80.         "Cut",
  81.             noicon, "X", nomark, plain;
  82.         "Copy",
  83.             noicon, "C", nomark, plain;
  84.         "Paste",
  85.             noicon, "V", nomark, plain;
  86.         "Clear",
  87.             noicon, nokey, nomark, plain
  88.     }
  89. };
  90.  
  91. resource 'MENU' (mWinFile, "File", preload) {
  92.     mWinFile, textMenuProc,
  93.     NoItems + MenuItem10,    /* just logout */
  94.     enabled, "File",
  95.     {
  96.         "New…",
  97.             noicon, nokey, nomark, plain;
  98.         "Open",
  99.             noicon, nokey, nomark, plain;
  100.         "Move…",
  101.             noicon, nokey, nomark, plain;
  102.         "Copy…",
  103.             noicon, nokey, nomark, plain;
  104.         "Delete",
  105.             noicon, nokey, nomark, plain;
  106.         "Properties…",
  107.             noicon, nokey, nomark, plain;
  108.         "-",
  109.             noicon, nokey, nomark, plain;
  110.         "Run…",
  111.             noicon, nokey, nomark, plain;
  112.         "-",
  113.             noicon, nokey, nomark, plain;
  114.         "Logoff…    Alt+F4",
  115.             noicon, nokey, nomark, plain;
  116.     }
  117. };
  118.  
  119. resource 'MENU' (mOptions, "Options", preload) {
  120.     mOptions, textMenuProc,
  121.     AllItems,    /* Disabled separators */
  122.     enabled, "Options",
  123.     {
  124.         "Auto Arrange",
  125.             noicon, nokey, check, plain;
  126.         "Minimize on Use",
  127.             noicon, nokey, nomark, plain;
  128.         "Save Settings on Exit",
  129.             noicon, nokey, check, plain;
  130.     }
  131. };
  132.  
  133. resource 'MENU' (mWindow, "Window", preload) {
  134.     mWindow, textMenuProc,
  135.     AllItems,    /* and Disabled separators */
  136.     enabled, "Window",
  137.     {
  138.         "Cascade    Shift+F5",
  139.             noicon, nokey, nomark, plain;
  140.         "Tile",
  141.             noicon, nokey, nomark, plain;
  142.         "Arrange Icons",
  143.             noicon, nokey, nomark, plain;
  144.         "-",
  145.             noicon, nokey, nomark, plain;
  146.         "1 Main",
  147.             noicon, nokey, nomark, plain;
  148.         "2 Accessories",
  149.             noicon, nokey, nomark, plain;
  150.         "3 Applications",
  151.             noicon, nokey, nomark, plain;
  152.         "4 Games",
  153.             noicon, nokey, nomark, plain;
  154.     }
  155. };
  156.  
  157. resource 'MENU' (mHelp, "Help", preload) {
  158.     mHelp, textMenuProc,
  159.     AllItems,    /* and Disabled separators */
  160.     enabled, "Help",
  161.     {
  162.         "Index",
  163.             noicon, nokey, nomark, plain;
  164.         "Keyboard",
  165.             noicon, nokey, nomark, plain;
  166.         "Commands",
  167.             noicon, nokey, nomark, plain;
  168.         "Procedures",
  169.             noicon, nokey, nomark, plain;
  170.         "Glossary",
  171.             noicon, nokey, nomark, plain;
  172.         "Using Help",
  173.             noicon, nokey, nomark, plain;
  174.         "-",
  175.             noicon, nokey, nomark, plain;
  176.         "About…",
  177.             noicon, nokey, nomark, plain;
  178.     }
  179. };
  180.  
  181. resource 'MENU' (mMines, "Game", preload) {
  182.     mMines, textMenuProc,
  183.     AllItems & ~(MenuItem6 + MenuItem10),    /* and Disabled separators */
  184.     enabled, "Game",
  185.     {
  186.         "New Game",
  187.             noicon, nokey, nomark, plain;
  188.         "-",
  189.             noicon, nokey, nomark, plain;
  190.         "Beginner",
  191.             noicon, nokey, nomark, plain;
  192.         "Intermediate",
  193.             noicon, nokey, check, plain;
  194.         "Expert",
  195.             noicon, nokey, nomark, plain;
  196.         "Custom…",
  197.             noicon, nokey, nomark, plain;
  198.         "-",
  199.             noicon, nokey, nomark, plain;
  200.         "Marks",
  201.             noicon, nokey, nomark, plain;
  202.         "-",
  203.             noicon, nokey, nomark, plain;
  204.         "Best Times…",
  205.             noicon, nokey, nomark, plain;
  206.     }
  207. };
  208.  
  209. resource 'MENU' (mMineHelp, "Help", preload) {
  210.     mMineHelp, textMenuProc,
  211.     AllItems,    /* Disabled separators */
  212.     enabled, "Help",
  213.     {
  214.         "How to Play",
  215.             noicon, nokey, nomark, plain;
  216.         "Commands",
  217.             noicon, nokey, nomark, plain;
  218.         "Using Help",
  219.             noicon, nokey, nomark, plain;
  220.         "-",
  221.             noicon, nokey, nomark, plain;
  222.         "About WinMines…",
  223.             noicon, nokey, nomark, plain;
  224.     }
  225. };
  226.  
  227. resource 'MENU' (mControl, "Control", preload) {
  228.     mControl, textMenuProc,
  229.     AllItems & ~(MenuItem2 + MenuItem3 + MenuItem9),    /* Disabled separators */
  230.     enabled, "Control",
  231.     {
  232.         "Restore",
  233.             noicon, nokey, nomark, plain;
  234.         "Move",
  235.             noicon, nokey, nomark, plain;
  236.         "Size",
  237.             noicon, nokey, nomark, plain;
  238.         "Minimize",
  239.             noicon, nokey, nomark, plain;
  240.         "Maximize",
  241.             noicon, nokey, nomark, plain;
  242.         "-",
  243.             noicon, nokey, nomark, plain;
  244.         "Close",
  245.             noicon, nokey, nomark, plain;
  246.         "-",
  247.             noicon, nokey, nomark, plain;
  248.         "Switch To…    Ctrl+Esc",
  249.             noicon, nokey, nomark, plain;
  250.     }
  251. };
  252.  
  253.  
  254. resource 'WIND' (rWindow, "Windows") {
  255.     {50, 80, 50, 80},
  256.     plainDBox, invisible, noGoAway, 0x0, "Windows"
  257. };
  258.  
  259.  
  260. /* this ALRT and DITL are used as an error screen */
  261.  
  262. resource 'ALRT' (rUserAlert, purgeable) {
  263.     {40, 20, 120, 260},
  264.     rUserAlert,
  265.     { /* array: 4 elements */
  266.         /* [1] */
  267.         OK, visible, silent,
  268.         /* [2] */
  269.         OK, visible, silent,
  270.         /* [3] */
  271.         OK, visible, silent,
  272.         /* [4] */
  273.         OK, visible, silent
  274.     }
  275. };
  276.  
  277.  
  278. resource 'DITL' (rUserAlert, purgeable) {
  279.     { /* array DITLarray: 3 elements */
  280.         /* [1] */
  281.         {50, 150, 70, 230},
  282.         Button {
  283.             enabled,
  284.             "OK"
  285.         },
  286.         /* [2] */
  287.         {10, 60, 30, 230},
  288.         StaticText {
  289.             disabled,
  290.             "Microsoft Windows - Error occurred!"
  291.         },
  292.         /* [3] */
  293.         {8, 8, 40, 40},
  294.         Icon {
  295.             disabled,
  296.             2
  297.         }
  298.     }
  299. };
  300.  
  301. resource 'STR#' (rTitleStr, "Title") {
  302.     {
  303.         "Invalid Path",
  304.         "Invalid Path",
  305.         "Invalid Path",
  306.         "Application Execution Error",
  307.         "Application Execution Error",
  308.         "Application Execution Error",
  309.         "Application Execution Error",
  310.         "Cannot Run Program",
  311.         "Terminal - Error",
  312.         "Dr. Watson",
  313.         "Windows Help",
  314.         "Exit Windows",
  315.         ".",
  316.         ".",
  317.     }
  318. };
  319.  
  320. resource 'STR#' (rTextStr, "Text") {
  321.     {
  322.         "\nThe path C:\\BIN\\ROOTGDI.PIF is invalid.",
  323.         "\nThe working directory is invalid.",
  324.         "Cannot find file (or one of its components).\n\n"
  325.             "Make sure the path and filenames are correct\n"
  326.             "and that all required libraries are available.",
  327.         "Application Error.\n\n"
  328.             "CLOCK caused a General Protection Fault in\n"
  329.             "module CLOCK.EXE at 0001:0D8E.",
  330.         "Unanticipated Application Exception.\n\n"
  331.             "Faults of this type have been renamed\n"
  332.             "for Windows 3.1.",
  333.         "No application is associated with this file.\n\n"
  334.             "Choose associate from the File menu to\n"
  335.             "create an association.",
  336.         "Insufficient memory to run this application.\n\n"
  337.             "Quit one or more Windows applications and\n"
  338.             "then try again.",
  339.         "The application you are about to run was \n"
  340.             "designed to run with Windows 2.0\n\n"
  341.             "Obtain an updated version for Windows 3.0",
  342.         "The selected COM port is either not supported\n"
  343.             "or is being used by another device.\n\n"
  344.             "Select another port.",
  345.         "Your 'Dr. Watson' log file 'c:\\drwatson.log'\n"
  346.             " is getting quite large.",
  347.         "Incompatable Help file.\n\n"
  348.             "Obtain an updated version for Windows 3.0",
  349.         "\nThis will end your windows session.",
  350.         "\n.",
  351.         "\n.",
  352.     }
  353. };
  354.  
  355. resource 'DLOG' (rCustom, "Custom") {
  356.     {90, 100, 180, 410},
  357.     dBoxProc, invisible, noGoAway, 0x0, rCustom, "Custom"
  358. };
  359.  
  360.  
  361. resource 'DITL' (rCustom) {
  362.      {
  363. /* 1 */ {60, 167, 81, 244},
  364.         button {
  365.             enabled,
  366.             "OK"
  367.         };
  368. /* 2 */ {5, 10, 60, 300},
  369.         staticText {
  370.             disabled,
  371.             "Custom\n"
  372.             "Bounds."
  373.         }
  374.     }
  375. };
  376.  
  377. resource 'DLOG' (rBestTimes, "Best Times") {
  378.     {90, 100, 180, 410},
  379.     dBoxProc, invisible, noGoAway, 0x0, rBestTimes, "Best Times"
  380. };
  381.  
  382.  
  383. resource 'DITL' (rBestTimes) {
  384.      {
  385. /* 1 */ {60, 167, 81, 244},
  386.         button {
  387.             enabled,
  388.             "OK"
  389.         };
  390. /* 2 */ {5, 10, 60, 300},
  391.         staticText {
  392.             disabled,
  393.             "Best \n"
  394.             "Times."
  395.         }
  396.     }
  397. };
  398.  
  399.  
  400. /* here is the quintessential MultiFinder friendliness device, the SIZE resource */
  401.  
  402. resource 'SIZE' (-1) {
  403.     dontSaveScreen,
  404.     acceptSuspendResumeEvents,
  405.     enableOptionSwitch,
  406.     canBackground,                /* we can background; we don't currently, but our sleep value */
  407.                                 /* guarantees we don't hog the Mac while we are in the background */
  408.     multiFinderAware,            /* this says we do our own activate/deactivate; don't fake us out */
  409.     backgroundAndForeground,    /* this is definitely not a background-only application! */
  410.     getFrontClicks,                /* change this is if you want "do first click" behavior like the Finder */
  411.     ignoreChildDiedEvents,        /* essentially, I'm not a debugger (sub-launching) */
  412.     not32BitCompatible,            /* this app should not be run in 32-bit address space */
  413.     reserved,
  414.     reserved,
  415.     reserved,
  416.     reserved,
  417.     reserved,
  418.     reserved,
  419.     reserved,
  420.     kPrefSize * 1024,
  421.     kMinSize * 1024    
  422. };
  423.  
  424.